MacOS Installation Guide for Stirling PDF
Stirling PDF can be run on macOS through the provided JAR file, which can be downloaded here Stirling-PDF-server.jar. We are working on a dedicated mac installer and expect its release in coming weeks. There are additional Prerequisites:
- JAVA 17 or 21 (21 preferred)
- Install via Homebrew:
brew install openjdk@21
- Install via Homebrew:
Optional Dependencies
Install these via Homebrew to enable additional features like advanced document conversion or PDF compression:
# Install Homebrew if needed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install dependencies as needed
brew install openjdk@21 # Required
brew install qpdf # PDF compression
brew install --cask libreoffice # Document conversion
brew install tesseract # OCR functionality
brew install tesseract-lang # Additional OCR languages
brew install poppler # PDF to HTML conversion
pip3 install weasyprint # URL to PDF conversion
For Tesseract OCR, add to config/settings.yml (generated once you first run the jar):
system:
tessdataDir: /usr/local/share/tessdata
Running Stirling PDF
- Open Terminal
- Navigate to the folder containing the JAR:
cd /path/to/folder/containing/jar
- Run the JAR file:
java -jar Stirling-PDF.jar
For convenience, you can create a simple script:
- Create a file named run-stirling.sh:
#!/bin/bash
cd /path/to/folder/containing/jar
java -jar Stirling-PDF.jar - Make it executable:
chmod +x run-stirling.sh
- Run it with:
./run-stirling.sh
Quick Troubleshooting
- Java not found? Add to ~/.zshrc:
export PATH="/usr/local/opt/openjdk@21/bin:$PATH"
- Verify installations with:
[command] --version
(e.g.,java --version
) - LibreOffice issues? Ensure no LibreOffice processes are running
- Need help? Visit GitHub Issues